/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/* 
 * File:   SecondRobot.h
 * Author: czq
 *
 * Created on October 11, 2018, 9:29 AM
 */

#ifndef SECONDROBOT_H
#define SECONDROBOT_H
option(SecondRobot)
{ 
    float p = -3.4f;

    initial_state(stand)
    {
	transition
	{
            if (state_time >= 18500.f)
            //if(!theTeamData.teammates.empty() && theTeamData.teammates[0].theBehaviorStatus.firstRobotArrived == 1)
                goto walkStraight;
	}
	action
	{
            Stand();
	}
    }

    state(walkStraight)
    {
	transition
	{
            if(theLibCodeRelease.odometryXSum >= 3800.f)
		goto finish;
	}
	action
	{
            WalkAtRelativeSpeed(Pose2f(p * theLibCodeRelease.odometryRSum, 1.f, 0.f));
	}
    }

    state(finish)
    {
	action
	{
            Stand();
	}
    }
}


#endif /* SECONDROBOT_H */

